package client.comm.baoding.api

import client.comm.commlib.network.data.JsonResult
import client.comm.commlib.network.data.Ret
import client.comm.commlib.network.data.WlDetail
import client.comm.baoding.api.bean.*
import client.comm.baoding.api.bean.UserAddress
import client.comm.baoding.api.bean.UserInfo
import client.comm.commlib.comm_ui.bean.CommImg
import okhttp3.MultipartBody
import okhttp3.RequestBody
import retrofit2.Response
import retrofit2.http.*

interface Oserve {
    /**
     * 登录
     */
    @FormUrlEncoded
    @POST("/users/login/")
    suspend fun login(
        @Field("username") phone: String,
        @Field("password") password: String,
        @Field("device") device: String,
        @Field("device_id") device_id: String,
        @Field("device_name") device_name: String
    ): Response<JsonResult<Auth>>


    @POST("/trading/check_password/")
    @FormUrlEncoded
    suspend fun check_password(@Field("pwd") pwd: String): Response<JsonResult<Ret>>

    //类型详情
    @GET("/mall/supply/goods_sku/")
    suspend fun goods_sku_list(
        @Query("page") page: Int,
        @Query("status") status: String,
        @Query("category_id") category_id: String = "100",
    ): Response<JsonResult<CateGoods>>

    /**
     * 设置用户收货地址
     */
    @FormUrlEncoded
    @POST("/mall/supply/set_user_address/")
    suspend fun set_gyl_address(
        @Field("address_id") address_id: String,
        @Field("name") name: String,
        @Field("phone") phone: String,
        @Field("province") province: String?,
        @Field("province_id") provinceId: String?,
        @Field("city") city: String?,
        @Field("city_id") cityId: String?,
        @Field("district") district: String?,
        @Field("district_id") districtId: String?,
        @Field("town") town: String?,
        @Field("town_id") town_id: String?,
        @Field("place") place: String
    ): Response<JsonResult<Ret>>

    //商品详情
    @POST("/mall/supply/goods_sku_detail/")
    @FormUrlEncoded
    suspend fun goods_sku_detail(
        @Field("goods_id") goods_id: String,
    ): Response<JsonResult<GoodsGylDetail>>

    /**
     * 获取当前充值订单
     */
    @POST("/trading/current_recharge/")
    suspend fun current_recharge(): Response<JsonResult<CurrentRechargeOrder>>

    //创建订单
    @POST("/trading/recharge_orders/")
    @FormUrlEncoded
    suspend fun recharge_orders(
        @Field("price") price: String,
        @Field("w_type") w_type: String
    ): Response<JsonResult<Ret>>

    //创建订单
    @POST("/trading/recharge_orders/")
    @FormUrlEncoded
    suspend fun recharge_orders2(
        @Field("price") price: String,
        @Field("w_type") w_type: String,
    ): Response<JsonResult<BankBind>>

    //创建订单
    @POST("/trading/recharge_orders/")
    @FormUrlEncoded
    suspend fun recharge_orders3(
        @Field("price") price: String,
        @Field("w_type") w_type: String,
        @Field("link_id") link_id: String
    ): Response<JsonResult<BankBind>>


    /**
     * 注册
     */
    @FormUrlEncoded
    @POST("/users/signup/")
    suspend fun register(
        @Field("username") username: String,
        @Field("phone") phone: String,
        @Field("password") password: String,
        @Field("password2") password2: String,
        @Field("captcha") captcha: String,
        @Field("invite") invite: String
    ): Response<JsonResult<Ret>>

    @POST("/trading/del_order/")
    @FormUrlEncoded
    suspend fun del_order(
        @Field("order_id") order_id: String,
    ): Response<JsonResult<Ret>>

    /**
     * 获取验证码
     */
    @FormUrlEncoded
    @POST("/common/captcha/")
    suspend fun getcode(
        @Field("phone") phone: String,
        @Field("ts") ts: String,
        @Field("sign") sign: String
    ): Response<JsonResult<Ret>>

    /**
     * 忘记密码
     */
    @FormUrlEncoded
    @POST("/users/forget_pwd/")
    suspend fun forget_pwd(
//        @Field("username") username: String,
        @Field("phone") phone: String,
        @Field("captcha") captcha: String,
        @Field("new_pwd") new_pwd: String,
        @Field("new_pwd2") new_pwd2: String
    ): Response<JsonResult<Ret>>

    /**
     * 修改密码
     */
    @FormUrlEncoded
    @POST("/users/reset_pwd/")
    suspend fun set_pwd(
        @Field("old_pwd") old_pwd: String,
        @Field("new_pwd") new_pwd: String,
        @Field("new_pwd2") new_pwd2: String
    ): Response<JsonResult<Ret>>

    /**
     * 修改支付密码
     */
    @FormUrlEncoded
    @POST("/users/forget_pay/")
    suspend fun forget_pay(
        @Field("username") username: String,
        @Field("phone") phone: String,
        @Field("captcha") captcha: String,
        @Field("new_pwd") new_pwd: String,
        @Field("new_pwd2") new_pwd2: String
    ): Response<JsonResult<Ret>>

    /**
     * 版本控制
     */
    @FormUrlEncoded
    @POST("/index/get_update2/")
    suspend fun get_update(
        @Field("device") device: String,
        @Field("version") version: String
    ): Response<JsonResult<VersionRet>>

    @Multipart
    @POST("/common/upload/")
    suspend fun upload(
        @Part("description") requestBody: RequestBody,
        @Part file: MultipartBody.Part?
    ): Response<JsonResult<UploadRet>>

    /**
     * 设置头像
     */
    @FormUrlEncoded
    @POST("/users/user_avatar/")
    suspend fun user_avatar(
        @Field("avatar") avatar: String
    ): Response<JsonResult<Ret>>

    /**
     * 商品首页
     */
    @GET("/mall/goods_index/")
    suspend fun goods_index(
    ): Response<JsonResult<GoodsIndex>>

    @GET("/mall/goods_index/")
    suspend fun goods_index_p(
        @Query("page") page: Int
    ): Response<JsonResult<GoodsIndex>>

    /**
     * 通知
     */
    @GET("/index/common_img/")
    suspend fun common_img(): Response<JsonResult<CommImg>>

    /**
     * 交易首页
     */
    @GET("/mall/trade_index/")
    suspend fun trade_index(
        @Query("page") page: Int
    ): Response<JsonResult<TradeIndex>>


    //置换
    @POST("/mall/goods_displace/")
    @FormUrlEncoded
    suspend fun goods_displace(
        @Field("order_id") order_id: String,
        @Field("goods_id") goods_id: String,
    ): Response<JsonResult<Ret>>

    /**
     * 用户信息
     */
    @GET("/users/user_info/")
    suspend fun userinfo(): Response<JsonResult<UserInfo>>

    /**
     * 搜索
     */
    @FormUrlEncoded
    @POST("/mall/goods_search/")
    suspend fun searchRet(
        @Field("page") page: Int,
        @Field("goods_name") goods_name: String,
        @Field("price_status") price_status: String,
        @Field("sales_status") sales_status: String
    ): Response<JsonResult<SeartchRet>>

    //商品购买
    @Headers("Content-Type: application/json;charset=UTF-8")
    @POST("/mall/buy_goods/")
    suspend fun goods_buy(@Body obj: RequestBody): Response<JsonResult<PayUrlBean>>

    //商品购买
    @Headers("Content-Type: application/json;charset=UTF-8")
    @POST("/mall/supply/buy_goods/")
    suspend fun supplygoods_buy(@Body obj: RequestBody): Response<JsonResult<PayUrlBean>>

    //转让详情
    @POST("/mall/trade_detail/")
    @FormUrlEncoded
    suspend fun trade_detail(
        @Field("goods_id") goods_id: String,
        @Field("token") token: String?,
    ): Response<JsonResult<GoodsDetail>>

    //交易商品详情
    @GET("/mall/trade_goods_detail/")
    suspend fun trade_goods_detail(
        @Query("goods_id") goods_id: String,
    ): Response<JsonResult<GoodsDetailTrade>>

//    /**
//     * 商品买卖原价买
//     */
//    @FormUrlEncoded
//    @POST("/mall/trade_buy_yj/")
//    suspend fun trade_buy_yj(
//        @Field("goods_id") goods_id: String,
////        @Field("goods_price") goods_price: String,
//        @Field("num") num: String,
//    ): Response<JsonResult<Ret>>

    /**
     * 商品买卖特价买
     */
    @FormUrlEncoded
    @POST("/mall/trade_buy_tj/")
    suspend fun trade_buy_tj(
        @Field("goods_id") goods_id: String,
//        @Field("goods_price") goods_price: String,
        @Field("num") num: String,
    ): Response<JsonResult<Ret>>


    /**
     * 特价提货
     */
    @FormUrlEncoded
    @POST("/mall/trade_take_tj/")
    suspend fun trade_take_tj(
        @Field("goods_id") goods_id: String,
        @Field("address_id") address_id: String,
        @Field("num") num: String,
    ): Response<JsonResult<Ret>>

    /**
     * 特价退款
     */
    @FormUrlEncoded
    @POST("/mall/trade_refund_tj/")
    suspend fun trade_refund_tj(
        @Field("goods_id") goods_id: String,
        @Field("num") num: String,
    ): Response<JsonResult<Ret>>

    //挂单
    @FormUrlEncoded
    @POST("/mall/trade_hang_order/")
    suspend fun trade_hang_order(
        @Field("num") num: String?,
        @Field("t_type") t_type: String?,
    ): Response<JsonResult<Ret>>

    @FormUrlEncoded
    @POST("/mall/trade_hang_order/")
    suspend fun trade_hang_order(
        @Field("num") num: String?,
        @Field("t_type") t_type: String?,
        @Field("pay_type") pay_type: String?,
    ): Response<JsonResult<Ret>>

    //划转
    @FormUrlEncoded
    @POST("/mall/transfer_wallet/")
    suspend fun transfer_wallet(
        @Field("num") num: String?,
    ): Response<JsonResult<Ret>>

    /**
     * zr 摘单
     */
    @FormUrlEncoded
    @POST("/mall/trade_pick_order/")
    suspend fun trade_pick_order(
        @Field("order_id") order_id: String,
        @Field("num") num: String,
        @Field("pay_type") pay_type: String,
    ): Response<JsonResult<Ret>>

    /**
     *
     */
    @FormUrlEncoded
    @POST("/mall/transfer_deal/")
    suspend fun transfer_deal(
        @Field("other_phone") other_phone: String?,
        @Field("num") num: String?,
    ): Response<JsonResult<Ret>>


    /**
     * zr 撤单
     */
    @FormUrlEncoded
    @POST("/mall/trade_revoke_order/")
    suspend fun trade_revoke_order(
        @Field("order_id") order_id: String,
    ): Response<JsonResult<Ret>>

//    /**
//     * 商品提货
//     */
//    @FormUrlEncoded
//    @POST("/mall/trade_take/")
//    suspend fun trade_take(
//        @Field("goods_id") goods_id: String,
////        @Field("goods_price") goods_price: String,
//        @Field("num") num: String,
//    ): Response<JsonResult<Ret>>

    /**
     * 商品买卖优惠买
     */
    @FormUrlEncoded
    @POST("/mall/trade_goods_buy_yh/")
    suspend fun trade_goods_buy_yh(
        @Field("goods_id") goods_id: String,
        @Field("goods_price") goods_price: String,
        @Field("num") num: String,
    ): Response<JsonResult<Ret>>

//    /**
//     * 支付宝支付
//     */
//    @FormUrlEncoded
//    @POST("/mall/alipay_post/") //alipay_post 非真实接口
//    suspend fun alipay_post(
//        @Field("order_sn") order_sn: String,
//        @Field("type") type: String
//    ): Response<JsonResult<String>>

    //获取用户地址
    @GET("/users/user_address/")
    suspend fun getAddress(): Response<JsonResult<UserAddress>>


    /**
     * 去支付
     */
    @FormUrlEncoded
    @POST("/mall/order_pay/")
    suspend fun order_pay(
        @Field("order_id") order_id: String
    ): Response<JsonResult<PayUrlBean>>

    @FormUrlEncoded
    @POST("/trading/order_pay/")
    suspend fun trading_order_pay(
        @Field("order_id") order_id: String,
    ): Response<JsonResult<BankBind>>

    /**
     * 检查支付
     */
    @FormUrlEncoded
    @POST("/mall/check_order_pay/")
    suspend fun check_order_pay(
        @Field("trade_no") trade_no: String
    ): Response<JsonResult<CheckPayBean>>

    /**
     * 取消订单
     */
    @FormUrlEncoded
    @POST("/mall/del_buy_order/")
    suspend fun del_buy_order(
        @Field("order_id") order_id: String
    ): Response<JsonResult<Ret>>

    @FormUrlEncoded
    @POST("/mall/withdraw_buy_order/")
    suspend fun signOrder(
        @Field("order_id") order_id: String?
    ): Response<JsonResult<Ret>>

    @GET("/mall/sign_order_record/")
    suspend fun sign_order_record(
        @Query("page") page: Int,
        @Query("order_id") order_id: String?
    ): Response<JsonResult<SignData>>

    /**
     * 确认订单
     */
    @FormUrlEncoded
    @POST("/mall/confirm_order/")
    suspend fun confirm_order(
        @Field("order_id") order_id: String
    ): Response<JsonResult<Ret>>

    //商品jil
    @POST("/mall/buy_order_record/")
    @FormUrlEncoded
    suspend fun buy_order_record(
        @Field("page") page: Int,
        @Field("status") status: Int
    ): Response<JsonResult<GoodsOrder>>

    //商品jil
    @GET("/mall/free_order_record/")
    suspend fun free_order_record(
        @Query("page") page: Int,
        @Query("status") status: Int
    ): Response<JsonResult<GoodsOrder>>

    /**
     *
     */
    @GET("/mall/v2.0/current_order/")
    suspend fun current_order(): Response<JsonResult<CurrOrderRet>>

    //验证支付密码
    @POST("/trading/user_pay_password/")
    @FormUrlEncoded
    suspend fun validatePayPwd(@Field("pay_pwd") pay_pwd: String): Response<JsonResult<Ret>>

    @POST("/trading/upload_img/")
    @FormUrlEncoded
    suspend fun upload_img(
        @Field("order_img") order_img: String,
        @Field("order_id") order_id: String,
        @Field("w_type") w_type: String,
    ): Response<JsonResult<Ret>>

    /**
     * 设置用户收货地址
     */
    @FormUrlEncoded
    @POST("/users/set_user_address/")
    suspend fun set_user_address(
        @Field("address_id") address_id: String,
        @Field("name") name: String,
        @Field("phone") phone: String,
        @Field("province") province: String?,
        @Field("city") city: String?,
        @Field("district") district: String?,
        @Field("place") place: String
    ): Response<JsonResult<Ret>>

    /**
     *
     */
    @FormUrlEncoded
    @POST("/mall/v2.0/seller_confirm/")
    suspend fun seller_confirm(
        @Field("order_id") order_id: String
    ): Response<JsonResult<Ret>>

    @POST("/mall/supply/del_address/")
    @FormUrlEncoded
    suspend fun del_addressgyl(
        @Field("address_id") address_id: String
    ): Response<JsonResult<Ret>>

    @POST("/users/del_address/")
    @FormUrlEncoded
    suspend fun del_address(
        @Field("address_id") address_id: String
    ): Response<JsonResult<Ret>>

    @POST("/mall/supply/address_default/")
    @FormUrlEncoded
    suspend fun address_defaultgyl(
        @Field("address_id") address_id: String
    ): Response<JsonResult<Ret>>

    @GET("/mall/supply/user_address/")
    suspend fun getGylAddress(): Response<JsonResult<UserAddress>>

    /**
     */
    @FormUrlEncoded
    @POST("/mall/supply/get_address/")
    suspend fun get_level_addrlist(
        @Field("code") code: String,
    ): Response<JsonResult<List<Addr>>>

    //设置默认收货地址
    @POST("/users/address_default/")
    @FormUrlEncoded
    suspend fun address_default(
        @Field("address_id") address_id: String
    ): Response<JsonResult<Ret>>

    //获取购物车
    @POST("/mall/shopping_cart/")
    @FormUrlEncoded
    suspend fun shopping_cart(
        @Field("page") page: String = "1",
    ): Response<JsonResult<BuyCartRet>>

    //删除购物车
    @POST("/mall/del_shopping_cart/")
    @FormUrlEncoded
    suspend fun del_shopping_cart(
        @Field("shopping_id") shopping_id: String,
    ): Response<JsonResult<Ret>>

    /**
     * 实名认证
     */
    @GET("/users/sand_pay_account/")
    suspend fun sand_pay_account(
    ): Response<JsonResult<RealRet>>

    /**
     * tx
     *
     * w_type
     * 1：提现
     * 2：提税
     */
    @FormUrlEncoded
    @POST("/users/withdraw/")
    suspend fun tx(
        @Field("price") price: String,
        @Field("w_type") w_type: String,
        @Field("pay_type") pay_type: String,
        @Field("captcha") captcha: String,
        @Field("phone") phone: String,
    ): Response<JsonResult<Ret>>


    /**
     * tx
     *
     * w_type
     * 1：提现
     * 2：提税
     */
    @FormUrlEncoded
    @POST("/users/withdraw/")
    suspend fun tx_notsms(
        @Field("price") price: String,
        @Field("w_type") w_type: String,
        @Field("pay_type") pay_type: String,
        @Field("phone") phone: String,
    ): Response<JsonResult<Ret>>

    //可提
    @FormUrlEncoded
    @POST("/users/user_tx_withdraw/")
    suspend fun ktx(
        @Field("link_id") link_id: String,
        @Field("price") price: String,
    ): Response<JsonResult<BankBind>>

    /**
     * tx
     *
     * w_type
     * 1：提现
     * 2：提税
     */
    @FormUrlEncoded
    @POST("/users/withdraw/")
    suspend fun tx2(
        @Field("price") price: String,
        @Field("w_type") w_type: String,
        @Field("pay_type") pay_type: String,
        @Field("captcha") captcha: String,
        @Field("phone") phone: String,
        @Field("withdraw_img") withdraw_img: String,
    ): Response<JsonResult<Ret>>

    /**
     * 资产记录
     * 1:钱包
     * 10：余额奖励
     * 9:积分
     * 21待释放商品，22可交易商品，23特价券
     * 2 可提    /mall/trade_hall/
     */
    @FormUrlEncoded
    @POST("/users/income_record/")
    suspend fun zcjl(
        @Field("page") page: Int,
        @Field("r_label") r_label: Int
    ): Response<JsonResult<Zcjl>>

    @GET("/mall/trade_hall/")
    suspend fun trade_hall(
        @Query("page") page: Int,
    ): Response<JsonResult<HangOrderRecord>>

    /**
     * 资产记录
     */
    @GET("/trading/user_coin_record/")
    suspend fun user_coin_record(
        @Query("page") page: Int,
        @Query("status") status: Int,
    ): Response<JsonResult<HmjlRet>>

    /**
     * 用户积分
     */
    @GET("/trading/batch_trade/")
    suspend fun user_integral_record(
        @Query("page") page: Int,
        @Query("status") status: Int,
    ): Response<JsonResult<IntegralRet>>


    /**
     * 积分转换
     */
    @FormUrlEncoded
    @POST("/trading/batch_transfer/")
    suspend fun confirm_integral_transfer(
        @Field("batch_id") batch_id: String
    ): Response<JsonResult<Ret>>


    /**
     * 资产记录
     */
    @FormUrlEncoded
    @POST("/trading/recharge_record/")
    suspend fun recharge_record(
        @Field("page") page: Int,
        @Field("w_type") w_type: Int
    ): Response<JsonResult<Zcjl>>

    /**
     * 资产记录
     */
    @FormUrlEncoded
    @POST("/trading/recharge_record/")
    suspend fun recharge_record(
        @Field("page") page: Int,
        @Field("status") status: String
    ): Response<JsonResult<Zcjl>>

    /**
     * 提现记录
     * w_type
     * 1.提现
     * 2.提税
     */
    @FormUrlEncoded
    @POST("/users/withdraw_record/")
    suspend fun withdraw_record(
        @Field("page") page: Int,
        @Field("w_type") w_type: String,
    ): Response<JsonResult<TxJl>>

    // 0是待确认   1是已完成
    @FormUrlEncoded
    @POST("/users/withdraw_tx_record/")
    suspend fun withdraw_tx_record(
        @Field("page") page: Int,
        @Field("r_label") r_label: String,
        @Field("status") status: String,
    ): Response<JsonResult<KTxJl>>

    //所有分类
    @GET("/mall/goods_category_all/")
    suspend fun goods_category_all(): Response<JsonResult<AllCate>>

    //类型详情
    @POST("/mall/goods_type_detail/")
    @FormUrlEncoded
    suspend fun goods_type_detail(
        @Field("page") page: Int,
        @Field("category_id") category_id: String,
        @Field("status") status: String = "0",
    ): Response<JsonResult<CateGoods>>

    //类型详情
    @POST("/mall/goods_type_detail/")
    @FormUrlEncoded
    suspend fun goods_type_detail2(
        @Field("page") page: Int,
        @Field("category_id") category_id: String,
    ): Response<JsonResult<CateGoods>>

    //商品详情
    @POST("/mall/goods_detail/")
    @FormUrlEncoded
    suspend fun goods_detail(
        @Field("goods_id") goods_id: String,
        @Field("token") token: String?,
    ): Response<JsonResult<GoodsDetail>>

    //添加购物车
    @POST("/mall/add_shopping_cart/")
    @FormUrlEncoded
    suspend fun add_shopping_cart(
        @Field("goods_id") goods_id: String,
        @Field("num") num: String = "1",
    ): Response<JsonResult<Ret>>

    /**
     * 设置收款信息
     */
    @FormUrlEncoded
    @POST("/users/user_pay_account/")
    suspend fun user_pay_account(
        @Field("pay_type") pay_type: Int
    ): Response<JsonResult<PayAccount>>

    //完善资料
    @POST("/users/set_pay_account/")
    @FormUrlEncoded
    suspend fun real_names(
        @Field("real_name") real_name: String,
        @Field("pay_type") pay_type: String,
        @Field("pay_name") pay_name: String,
        @Field("bank_name") bank_name: String,
        @Field("pay_card") pay_card: String,
        @Field("pay_img") pay_img: String,
        @Field("phone") phone: String,
        @Field("captcha") captcha: String
    ): Response<JsonResult<Ret>>

    /**
     * 提现记录
     */
    @GET("/mall/mall_coupons/")
    suspend fun all_coupon(
    ): Response<JsonResult<AllCoupon>>

    /**
     * 领取优惠券
     */
    @FormUrlEncoded
    @POST("/mall/get_coupons/")
    suspend fun get_coupons(
        @Field("coupons_id") coupons_id: String
    ): Response<JsonResult<Ret>>

    /**
     * 我的优惠券
     */
    @FormUrlEncoded
    @POST("/users/user_coupons/")
    suspend fun user_coupons(
        @Field("page") page: Int,
        @Field("status") status: Int,
    ): Response<JsonResult<MeCoupon>>

    /**
     * 物流信息
     */
    @FormUrlEncoded
    @POST("/mall/deliver_info/")
    suspend fun deliver_info(
        @Field("order_id") order_id: String,
    ): Response<JsonResult<WlDetail>>

    /**
     * 当前订单
     */
    @GET("/mall/current_buy_order/")
    suspend fun current_buy_order(): Response<JsonResult<CurOrderDetail>>

    /**
     *
     */
    @FormUrlEncoded
    @POST("/mall/back_order_record/")
    suspend fun back_order_record(
        @Field("page") page: Int,
    ): Response<JsonResult<TuikuanList>>

    //退货
    @POST("/mall/goods_refunds/")
    @FormUrlEncoded
    suspend fun applyTuikuan(
        @Field("order_goods_id") order_goods_id: String,
        @Field("num") num: String,
        @Field("back_status") back_status: String,
        @Field("logistics_name") logistics_name: String,
        @Field("logistics_num") logistics_num: String,
    ): Response<JsonResult<Ret>>

    //代理
    @POST("/index/get_user_team/")
    @FormUrlEncoded
    suspend fun get_user_team(
        @Field("user_id") user_id: String,
        @Field("page") page: Int
    ): Response<JsonResult<TdBean>>

    //代理
    @POST("/index/get_user_team/")
    @FormUrlEncoded
    suspend fun get_user_team1(
        @Field("user_id") user_id: String,
        @Field("page") page: Int,
        @Field("status") status: Int
    ): Response<JsonResult<TdBean>>

    /**
     * 资产记录
     */
    @FormUrlEncoded
    @POST("/trading/hm_trade/")
    suspend fun hm_trade(
        @Field("number") number: String,
        @Field("w_type") w_type: Int
    ): Response<JsonResult<Ret>>

    /**
     *
     */
    @GET("/users/user_sign_in/")
    suspend fun user_sign_in(): Response<JsonResult<Ret>>


    /**
     * 转账
     */
    @FormUrlEncoded
    @POST("/trading/transfer/")
    suspend fun transfer(
        @Field("username") page: String,
        @Field("number") status: String
    ): Response<JsonResult<Ret>>

    // /users/reset_username/    post请求  参数 username
    // /users/user_out/   get请求  注销登录

    /**
     * 修改用户名
     */
    @FormUrlEncoded
    @POST("/users/reset_username/")
    suspend fun reset_username(
        @Field("username") username: String,
    ): Response<JsonResult<Ret>>

    /**
     * 注销登录
     */
    @GET("/users/user_out/")
    suspend fun user_out(): Response<JsonResult<Ret>>

    /**
     * 转账给 子/主 系统
     */
    @FormUrlEncoded
    @POST("/users/user_income_transfer/")
    suspend fun user_income_transfer(
        @Field("num") num: String,
    ): Response<JsonResult<Ret>>

    /**
     * 实名认证
     */
    @FormUrlEncoded
    @POST("/users/user_real_name/")
    suspend fun user_real_name(
        @Field("real_name") real_name: String,
        @Field("id_card") id_card: String,
        @Field("id_img") id_img: String,
    ): Response<JsonResult<RealRet>>

    /**
     * zr 我的挂单
     */
    @GET("/mall/trade_my_order/")
    suspend fun trade_my_order(
        @Query("page") page: Int,
        @Query("status") status: String,//0为挂单中，不传为所有
    ): Response<JsonResult<HangOrderRecord>>

    @GET("/mall/trade_my_order/")
    suspend fun trade_my_order_no_id(
        @Query("page") page: Int,
        @Query("status") status: String,//0为挂单中，不传为所有
    ): Response<JsonResult<HangOrderRecord>>

    /**
     * 我的资产
     */
    @FormUrlEncoded
    @POST("/mall/trade_my_assets/")
    suspend fun trade_my_assets(
        @Field("page") page: Int,
//        @Field("r_label") r_label: Int
    ): Response<JsonResult<AssetsRecode>>

    /**
     * 我的资产2
     */
    @GET("/mall/my_trade_list/")
    suspend fun my_trade_list(
    ): Response<JsonResult<AssetsRecode2>>


    /**
     * 绑卡信息列表
     */
    @GET("/users/user_card_list/")
    suspend fun user_card_list(): Response<JsonResult<UserCards>>

    //银行绑卡
    @POST("/users/bind_card/")
    @FormUrlEncoded
    suspend fun bind_card(
        @Field("tel_no") tel_no: String,
        @Field("card_id") card_id: String,
        @Field("bank_name") bank_name: String,
//        @Field("c_type") c_type: String,
//        @Field("vip_code") vip_code: String,
//        @Field("expiration") expiration: String,
    ): Response<JsonResult<BankBind>>

    //银行绑卡验证
    //(绑卡的短信确认传1   充值的短信确认传2  提现的短信传3)
    @POST("/users/sms_code_confirm/")
    @FormUrlEncoded
    suspend fun sms_code_confirm(
        @Field("sms_code") sms_code: String,
        @Field("auth_sn") auth_sn: String,
        @Field("request_no") request_no: String,
        @Field("status") status: String,
    ): Response<JsonResult<Ret>>

//    //确认充值接口
//    @POST("/users/confirm_pay/")
//    @FormUrlEncoded
//    suspend fun confirm_pay(
//        @Field("sms_code") sms_code: String,
//        @Field("auth_sn") auth_sn: String,
//        @Field("request_no") request_no: String,
//    ): Response<JsonResult<Ret>>

    //选择卡支付
    @POST("/users/save_card/")
    @FormUrlEncoded
    suspend fun save_card(
        @Field("id") id: String,
        @Field("card_id") card_id: String,
    ): Response<JsonResult<Ret>>

    @POST("/trading/del_order/")
    @FormUrlEncoded
    suspend fun trading_del_order(
        @Field("order_id") order_id: String,
    ): Response<JsonResult<Ret>>

    //解绑银行卡
    @POST("/users/un_bind_card/")
    @FormUrlEncoded
    suspend fun un_bind_card(
        @Field("link_id") link_id: String
    ): Response<JsonResult<Ret>>

    //可提 取消
    @POST("/users/withdraw_tx_cancel/")
    @FormUrlEncoded
    suspend fun withdraw_tx_cancel(
        @Field("order_id") order_id: String,
    ): Response<JsonResult<Ret>>

    //提现 重发短信
    @POST("/users/withdraw_order_pay/")
    @FormUrlEncoded
    suspend fun withdraw_order_pay(
        @Field("order_id") order_id: String,
    ): Response<JsonResult<BankBind>>

}